package com.sias.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName ipset
 */
@TableName(value ="ipset")
@Data
public class Ipset implements Serializable {
    /**
     * 
     */
    @TableId
    private String ip;

    /**
     * 
     */
    private String type;

    /**
     * 
     */
    private String mark;

    /**
     * 
     */
    private Date firsttime;

    /**
     * 
     */
    private Date bantime;

    /**
     * 
     */
    private Date totime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Ipset other = (Ipset) that;
        return (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getMark() == null ? other.getMark() == null : this.getMark().equals(other.getMark()))
            && (this.getFirsttime() == null ? other.getFirsttime() == null : this.getFirsttime().equals(other.getFirsttime()))
            && (this.getBantime() == null ? other.getBantime() == null : this.getBantime().equals(other.getBantime()))
            && (this.getTotime() == null ? other.getTotime() == null : this.getTotime().equals(other.getTotime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getMark() == null) ? 0 : getMark().hashCode());
        result = prime * result + ((getFirsttime() == null) ? 0 : getFirsttime().hashCode());
        result = prime * result + ((getBantime() == null) ? 0 : getBantime().hashCode());
        result = prime * result + ((getTotime() == null) ? 0 : getTotime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ip=").append(ip);
        sb.append(", type=").append(type);
        sb.append(", mark=").append(mark);
        sb.append(", firsttime=").append(firsttime);
        sb.append(", bantime=").append(bantime);
        sb.append(", totime=").append(totime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}